The keyword 'Then' is expected after this If statement's condition Error
You neglected to type the 'Then' keyword after the Boolean condition in an If statement. To eliminate the possibility of this error, type Shift+Enter after typing
IF condition
REALbasic will then add the "Then" after the condition and then add the End If statement.
Another shortcut is to write only the statements that meet the condition (inside the If...End if), select them, and then choose Wrap in If...End If from the Code Editor contextual menu.